[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------+#################################################################
#+-| ACCEPT |------------------------------------------------+################
#| +--------+ The ACCEPT command displays an optional prompt |################
#| and allows for string input which will be |################
#| assigned to a character variable |################
#+-----------------------------------------------------------+################
##############################################################################
##############################################################################
#+--| Syntax |------------------------+#######################################
#| ACCEPT [<C-exp>] TO <C-var> |#######################################
#+------------------------------------+#######################################
##############################################################################
##############################################################################
######+---| Description |----------------------------------------------+######
######| A carriage return is printed before the prompt and/or keyboard |######
######| input unless the FORCE variable __cr_first is FALSE. The |######
######| carriage return and optional prompt are displayed through the |######
######| same I/O system as the ? command. |######
######| -------------------------------------------------------------- |######
######| TO <C-var> |######
######| |######
######| <C-var> cannot be a field variable. Editing can occur up to |######
######| the declared length of <C-var>. |######
######| -------------------------------------------------------------- |######
######| The ACCEPT and INPUT commands share a line-based keyboard |######
######| input routine. The ACCEPT and INPUT keys and their meanings |######
######| are represented in the ACCEPT INPUT TABLE. |######
######+----------------------------------------------------------------+######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Get a name into a character variable, name_var |#########
#########| |#########
#########| ACCEPT "Input name: " TO name_var |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Get the name, without a prompt. |#########
#########| |#########
#########| ACCEPT TO name_var |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * Set the cursor to 16,5 and then get input. |#########
#########| |#########
#########| #include data.hdr |#########
#########| |#########
#########| VARDEF |#########
#########| CHAR a_char |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| @ 16,5 |#########
#########| __cr_first = .F. && see data.hdr. A FORCE |#########
#########| && modifiable variable. |#########
#########| |#########
#########| ACCEPT "Prompt will be at 16,5: " TO a_char |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
@...GET
INPUT
READ
WAIT
ACCEPT INPUT TABLE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson